CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
IF(POLICY CMP0046)
  CMAKE_POLICY(SET CMP0046 NEW)
ENDIF()
IF(POLICY CMP0054)
  CMAKE_POLICY(SET CMP0054 NEW)
ENDIF()

#find package
FIND_PACKAGE(OpenCV REQUIRED)

#c14
ADD_DEFINITIONS("-std=c++14")

#过滤代码
FILE(GLOB_RECURSE SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")

#增加包含路径
LIST(APPEND INCLUDE_DIR_LISTS
	${OpenCV_INCLUDE_DIRS})

INCLUDE_DIRECTORIES(${INCLUDE_DIR_LISTS})

#链接库
LIST(APPEND OPENCV_LIBS
	opencv_core
	opencv_highgui
	opencv_videoio
	opencv_imgcodecs
	opencv_imgproc
	opencv_dnn)

#生成可执行二进制文件
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
CUDA_ADD_EXECUTABLE(mtcnn ${SRCS})
TARGET_LINK_LIBRARIES(mtcnn ${OPENCV_LIBS})


